package com.wx.entity;

import com.wx.common.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Table(name = "sys_article")
@Data
public class SysArticle extends BaseEntity implements Serializable {

    private static final long serialVersionUID = -5299891042961104843L;
    /**
     * 文章内容
     */
    @ApiModelProperty(value = "文章内容")
    @Column(name = "content")
    @NotEmpty(message = "文章内容不能为空")
    private String content;

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    @Column(name = "title")
    @NotEmpty(message = "标题不能为空")
    private String title;

    /**
     * 文章类型 0:项目介绍
     */
    @ApiModelProperty(value = "文章类型 0:项目介绍")
    @Column(name = "type")
    @NotNull(message = "文章类型不能为空")
    private Integer type;


    /**
     * 状态
     */
    @ApiModelProperty(value = "状态 0:禁用 1：启用")
    @Column(name = "status")
    @NotNull(message = "状态不能为空")
    private Integer status;

    /**
     * 是否允许评论 0：否 1：是
     */
    @ApiModelProperty(value = "是否允许评论 0：否 1：是")
    @Column(name = "allow_comment")
    private Integer allowComment;

}